<?xml version="1.0" encoding="UTF-8"?>

<!--
    Document   : editInfo.xsl
    Created on : November 18, 2013, 12:49 PM
    Author     : BAOLA
    Description:
        Purpose of transformation follows.
-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:p="http://xml.netbeans.org/schema/account" exclude-result-prefixes="p" version="1.0">
    <xsl:output method="html"/>
<xsl:param name="username"></xsl:param>
    <!-- TODO customize transformation rules 
         syntax recommendation http://www.w3.org/TR/xslt 
    -->
    <xsl:template match="/">
        <xsl:apply-templates/>
    </xsl:template>
    <xsl:template match="p:account">
        <xsl:if test="p:username=$username">
            
                <div class="information-container">

                    <h4>User info</h4>
                    <ul class="profile-intro">
                        <li>
                            <label>Username:</label>
                            <input type="text" name="username" readonly="true">
                                <xsl:attribute name="value">
                                    <xsl:value-of select="p:username"/>
                                </xsl:attribute>
                            </input>
                        </li>
                        <li>
                            <label>First Name:</label>
                            <input type="text" name="firstname">
                                <xsl:attribute name="value">
                                <xsl:value-of select="p:firstname"/>
                                </xsl:attribute>
                            </input>
                        </li>
                        <li>
                            <label>Last Name:</label>
                            <input type="text" name="lastname" value="">
                                <xsl:attribute name="value">
                                    <xsl:value-of select="p:lastname"/>
                                </xsl:attribute>
                            </input>
                        </li>
                        <li>
                            <label>Email:</label>
                            <input type="text" name="email" value="">
                                <xsl:attribute name="value">
                                    <xsl:value-of select="p:email"/>
                                </xsl:attribute>
                            </input>
                        </li>
                    </ul>
                </div>
            
        </xsl:if>
    </xsl:template>

</xsl:stylesheet>
